package expriment3_bag;

public class eleven {
    public static void main(String[] args) {
        int  i,j,k;
        int a[][]=new int [3][4];
        int b[][]={
                {1,5,2,8},
                {5,9,10,-3},
                {2,7,-5,-18}
        };
        int c[][]=new int[3][4];
        for (i=0;i<3;i++)
            for (j=0; j<4 ;j++)
                a[i][j]=(i+1)*(j+2);
        for (i=0;i<a.length;i++)
            for (j=0;j<a[i].length;j++)
                c[i][j]=a[i][j]+b[i][j];

        System.out.println("***************");
        for(i=0;i<c.length;i++){
            for (j=0;j<c[i].length;j++)
                System.out.print(c[i][j]+ " ");
            System.out.println();
        }
    }
}
